<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set var="base" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>登入</title>
</head>
<body>
  <shiro:guest>
    <form action="${base}/login">
      <table>
        <tr>
          <td>user</td>
          <td><input type="text" name="username"></td>
        </tr>
        <tr>
          <td>password</td>
          <td><input type="password" name="password"></td>
        </tr>
        <tr>
          <td colspan="2">
            <button type="submit">login</button>
          </td>
        </tr>
      </table>
    </form>

  </shiro:guest>
<shiro:user>
  <c:redirect url="${base}/curcom"></c:redirect>
</shiro:user>
</body>
</html>
